﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DefTax.aspx.cs" Inherits="UI.ModSalary.DefTax" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>设置个人所得税参数</title>
      <link rel="stylesheet" type="text/css" href="../Styles/BaseStyle.css" />
      <script type="text/javascript">
          function aclose(code, bMoney, eMoney, tax, constMoney) {
              this.document.forms[0].txtTaxCode.value = code;
              this.document.forms[0].txtBMoney.value = bMoney;
              this.document.forms[0].txtEMoney.value = eMoney;
              this.document.forms[0].txtTax.value = tax;
              this.document.forms[0].txtConstMoney.value = constMoney;
          }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="pagetop" class="pagetop">
        <div class="pagetopleft">
            <b>设置所得税参数</b></div>  
             <div class="pagetopright">
    个税起征点  <asp:TextBox ID="txtBegin" runat="server" CssClass="InputCss" Width="100px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>&nbsp;

                      个税减费用额  <asp:TextBox ID="txtDecreaseNum" runat="server" CssClass="InputCss" Width="100px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
        <asp:Button ID="btnBegin" runat="server" CssClass="ButtonCss" Text="设置" 
                     onclick="btnBegin_Click" />  &nbsp; &nbsp;

    </div>   
    </div>
   
   <div id="ear">
    <table style="width: 95%;" align="center" class="td">
        <tr>
            <td style="width: 40px;">
                序号
            </td>
            <td>
                <asp:TextBox ID="txtTaxCode" runat="server" CssClass="InputCss" Width="50px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
       
            <td style="width: 50px;">
                起始额 
            </td>
            <td>
                <asp:TextBox ID="txtBMoney" runat="server" CssClass="InputCss" Width="60px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
       
            <td style="width: 50px;">
                结束额 
            </td>
            <td>
                <asp:TextBox ID="txtEMoney" runat="server" CssClass="InputCss" Width="60px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
       
            <td style="width: 40px;">
                税率 
            </td>
            <td>
                <asp:TextBox ID="txtTax" runat="server" CssClass="InputCss" Width="50px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
       
            <td style="width: 75px;">
                速算扣除数 
            </td>
            <td>
                <asp:TextBox ID="txtConstMoney" runat="server" CssClass="InputCss" Width="60px"
                    onkeydown="if(event.keyCode==13)event.keyCode=9"></asp:TextBox>
            </td>
           
            <td>
                <asp:Button ID="btnAdd" runat="server" Text="增加" OnClick="btnAdd_Click"   />
        &nbsp;<asp:Button ID="btnUpdate" runat="server" Text="更新" OnClick="btnUpdate_Click" />
        &nbsp;<asp:Button ID="btnDelete" runat="server" Text="删除" OnClick="btnDelete_Click"
            OnClientClick="return confirm('确定要删除吗?\n');" />
        &nbsp;</td>
        </tr>
    </table>
    </div>
    <asp:GridView ID="gvList" runat="server" AutoGenerateColumns="false"  HorizontalAlign="Center" Width="90%" BackColor="White" BorderColor="#999999" 
        BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" CssClass="td">
            <AlternatingRowStyle BackColor="#DCDCDC" />
      <Columns>
          <asp:TemplateField HeaderText="级别号" SortExpression="TaxCode">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("TaxCode") %>','<%# Eval("BMoney") %>','<%# Eval("EMoney") %>','<%# Eval("Tax") %>','<%# Eval("ConstMoney") %>')">
                            <%# Eval("TaxCode")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="起始额" SortExpression="BMoney">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("TaxCode") %>','<%# Eval("BMoney") %>','<%# Eval("EMoney") %>','<%# Eval("Tax") %>','<%# Eval("ConstMoney") %>')">
                            <%# Eval("BMoney")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="结束额" SortExpression="EMoney">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("TaxCode") %>','<%# Eval("BMoney") %>','<%# Eval("EMoney") %>','<%# Eval("Tax") %>','<%# Eval("ConstMoney") %>')">
                            <%# Eval("EMoney")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="税率" SortExpression="Tax">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("TaxCode") %>','<%# Eval("BMoney") %>','<%# Eval("EMoney") %>','<%# Eval("Tax") %>','<%# Eval("ConstMoney") %>')">
                            <%# Eval("Tax")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
                 <asp:TemplateField HeaderText="速算扣除数" SortExpression="ConstMoney">
                    <ItemTemplate>
                        <a style="cursor: hand" onclick="javascript:aclose('<%# Eval("TaxCode") %>','<%# Eval("BMoney") %>','<%# Eval("EMoney") %>','<%# Eval("Tax") %>','<%# Eval("ConstMoney") %>')">
                            <%# Eval("ConstMoney")%></a>
                    </ItemTemplate>
                </asp:TemplateField>
            
        </Columns> 
          <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />                      
                        <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                        <AlternatingRowStyle BackColor="#F7F7F7" />
    </asp:GridView>
    </form>
</body>
</html>
